﻿using System;
using System.Web;
using System.Web.Routing;

namespace Fuse8.CMF.BaseWebsite.Administration
{
    public class AdminCustomAreaRouteConstraint : IRouteConstraint
    {
        #region IRouteConstraint Members

        public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
        {
            return httpContext.Request.RawUrl.StartsWith("/admin-custom", StringComparison.OrdinalIgnoreCase);
        }

        #endregion
    }
}